<!--
  ~ Module: r2-testapp-kotlin
  ~ Developers: Aferdita Muriqi, Clément Baumann, Mostapha Idoubihi, Paul Stoica
  ~
  ~ Copyright (c) 2018. European Digital Reading Lab. All rights reserved.
  ~ Licensed to the Readium Foundation under one or more contributor license agreements.
  ~ Use of this source code is governed by a BSD-style license which is detailed in the
  ~ LICENSE file present in the project repository where this source code is maintained.
  -->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/bookmark_item"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="10dp" >

    <TextView
        android:id="@+id/highlight_chapter"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="4dp"
        android:layout_marginEnd="10dp"
        android:textSize="15sp"
        android:ellipsize="end"
        android:maxLines="1"
        app:layout_constrainedWidth="true"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toStartOf="@id/highlight_time_stamp"
        app:layout_constraintStart_toStartOf="parent"/>

    <TextView
        android:id="@+id/highlight_time_stamp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="20dp"
        android:layout_marginTop="4dp"
        android:textSize="12sp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"/>

    <TextView
        android:id="@+id/highlight_text"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:text="@string/chapter_page"
        android:maxLines="2"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:ellipsize="end"
        app:layout_goneMarginEnd="20dp"
        app:layout_constraintEnd_toStartOf="@+id/highlight_time_stamp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/highlight_chapter" />

    <TextView
        android:id="@+id/annotation"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="15dp"
        android:layout_marginTop="4dp"
        android:maxLines="2"
        android:textSize="16sp"
        app:layout_constraintEnd_toStartOf="@+id/highlight_overflow"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/highlight_text" />

    <ImageView
        android:id="@+id/highlight_overflow"
        android:layout_width="30dp"
        android:layout_height="0dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:contentDescription="@string/more_options"
        android:src="@drawable/icon_overflow"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>